﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.DialogUI {
    import flash.display.*;
    import flash.utils.*;
    import Display.aswingui.*;

    public class PermitBuyShareDialogView extends GenericDialogView {

        protected var m_PermitsRequired:int;
        protected var m_PermitOverrideCost:int;
        protected var m_rewardGoods:int;
        protected var m_dialogIcon:String;
        protected var m_titleIcon:String;
        protected var m_pic:Loader;
        protected var m_levelIconPane;
        protected var m_panelDict:Dictionary;
        private var m_heartObject:DisplayObject;

        public function PermitBuyShareDialogView(_arg1:Dictionary, _arg2:String="", _arg3:String="", _arg4:int=0, _arg5:Function=null, _arg6:String="", _arg7:int=0, _arg8:int=0, _arg9:int=0){
            this.m_PermitsRequired = _arg8;
            this.m_PermitOverrideCost = _arg9;
            super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
        }
        override protected function init():void{
            switch (this.m_type){
                case GenericDialogView.TYPE_ASKFRIENDS_BUYPERMITS:
                    m_acceptTextName = ZLoc.t("Dialogs", "PermitDialog_buy", {amount:this.m_PermitOverrideCost.toString()});
                    m_cancelTextName = ZLoc.t("Dialogs", "PermitDialog_ask");
                    break;
                case GenericDialogView.TYPE_INVITEFRIENDS_BUYNEIGHBORS:
                    m_acceptTextName = ZLoc.t("Dialogs", "NeighborBuyDialog_buy", {amount:this.m_PermitOverrideCost.toString()});
                    m_cancelTextName = ZLoc.t("Dialogs", "NeighborBuyDialog_ask");
                    break;
                case GenericDialogView.TYPE_INVITEFRIENDS_BUYFRANCHISEUNLOCKS:
                    m_acceptTextName = ZLoc.t("Dialogs", "FranchiseUnlockBuyDialog_buy", {amount:this.m_PermitOverrideCost.toString()});
                    m_cancelTextName = ZLoc.t("Dialogs", "FranchiseUnlockBuyDialog_ask");
                    break;
            };
            m_bgAsset = m_assetDict["dialog_bg"];
            m_closeBtn = m_assetDict["dialog_bg"];
            makeBackground();
            makeCenterPanel();
            ASwingHelper.prepare(this);
        }

    }
}//package Display.DialogUI 
